Solving A Complex Ion Formation Problem